import { post, remove, get, put } from './api'
// import { read } from '../store/modules/init.js'
// 获取信息列表
export const getMessageApi = (newPer) => {
    const url = '/usermgt/message'
    const body = {
        method: 'getMessages',
        args: JSON.stringify(newPer)
    }
    return post(url, body)
}
export const sendMessageApi = (newPer) => {
    const url = '/usermgt/message'
     const body = {
        method: 'sendMessage',
        args: JSON.stringify(newPer)
    }
    return post(url, body)
}
//更改状态
export const deletePerApi = (per) => {
    const obj = {
        ids: [per.id] ,
        /*ids: per.messageEmployeeId ,*/
        status: 'END'
    }
    const body = {
        method: 'batchUpdatesStatus',
        args: JSON.stringify(obj)
    }
    const url = '/usermgt/message'
    return put(url, body)
}
// 按状态查询消息总数
export const mountMessageApi = (newPer) => {
    const url = '/usermgt/message'
    const body = {
        method: 'getMessageCount',
        args: JSON.stringify(newPer)
    }
    return post(url, body)
}